package com.mlog.njyjy.ndop.process.admin.support.enums;

import java.util.Arrays;
import java.util.Optional;

/**
 * <p>
 *
 * </p>
 *
 * @author zyz
 * @version v1.0, 2020/8/18
 */
public enum CollectWay {

    message,
    ftp,
    api;


    public static CollectWay getCollectWay(String name) {

        Optional<CollectWay> collectWay = Arrays.stream(CollectWay.values()).filter(way -> name.equalsIgnoreCase(way.name())).findFirst();
        return collectWay.orElse(null);
    }
}
